/*
 * This file is a part of qloudgen-esb. 
 * You can redistribute qloudgen-esb and/or modify it under the terms of the Lesser GNU General Public License version 3. 
 * qloudgen-esb is distributed WITHOUT ANY WARRANTY. 
 * 
 * See the Lesser GNU General Public License for more details at http://www.gnu.org/licenses/.
 *  
 * Copyright (C) 2014 Qloudgen Technology
*/

package com.qloudgen.csb;

import kafka.consumer.ConsumerConfig;

import org.zeromq.ZContext;

public class ZmqConsumerBase {
	protected ConsumerConfig config;
	protected String topic;
	protected int bufferSize;
	protected ZContext ctx;
	protected String conn;
	protected int timeout;
	protected int retry;
	protected String id;
	protected ErrorHandler errHandler;
	
    public static final int ACKNOWLEDGED = 0;
    public static final int TIMEOUT = -1;
    public static final int UNREACHABLE = -2;
    public static final int INTERRUPTED = -3;

    public ZmqConsumerBase(String topic, ConsumerConfig config, 
    		int bufferSize, ZContext ctx, String conn, 
    			int timeout, int retry, ErrorHandler errHandler) {
    	this.config = config;
        this.topic = topic;
        this.bufferSize = bufferSize;
        this.ctx = ctx;
        this.conn = conn;
        this.timeout = timeout;
        this.retry = retry;
    	this.errHandler = errHandler;
    }
}

